
// SEARCH
#JahiaGxtSearchTab.tab_search {
    width: 100% !important;

    &::before {
        /* Tab Content Header Label */
        content: _dictionary("search") !important;
    }

    .x-panel-btns {
        margin-top: 20px;
        left: 1px;
        position: relative;

    }

    > div {
        height: 100% !important;
        overflow: scroll !important;
        width: 100% !important;
    }

    .JahiaGxtSearchTab-form {
        width: 100% !important;

        .x-toolbar-right {
            @include button("ACTIONBAR---SUGGESTED", "remove-icons");
        }
    }

    .JahiaGxtSearchTab-results {
        right: 0;
        position: absolute;
        top: 0;
        height: 100%;
        width: 300px;
        display: none;
        pointer-events: none;

        .x-panel-bwrap {
            position: fixed;
            top: -20px;
            left: 360px;
            width: 318px;
            background: transparent !important;
            padding-left: 10px;
            box-shadow: inset 3px 0px 7px #babbbc, inset -24px 0px 0 0 transparent;
            height: calc(100% + 40px) !important;

            &::before {
                content: _dictionary("results");
                display: block;
                position: absolute;
                top: 30px;
                left: 19px;

                @include text(16px, #7b7f81, _weight("light"))
            }

            body.minimise-results & {
                &::before {
                    display: none;
                }
            }
        }

        // Results list container
        .x-panel-body {
            height: calc(100% - 79px) !important;
            padding-top: 60px;
        }

        // Pagination
        .x-panel-bbar {
            position: relative;
            bottom: 52px;
            z-index: 9999999;
            background: linear-gradient(to right, rgba(44, 46, 48, 1) 0%, rgba(80, 84, 87, 1) 6%);;
            left: -10px;
            width: calc(100% + 35px) !important;
            height: 51px;

            body.minimise-results & {
                opacity: 0;
                pointer-events: none;
            }

            > div {
                padding: 0 10px;
                height: 100%;
            }

            .x-toolbar-left,
            .x-toolbar-right {
                display: block;

                table,
                tbody,
                tr,
                td {
                    display: block;

                }
            }

            .x-toolbar-right {
                position: relative;
                top: 5px;
            }

            .x-toolbar-left {

                position: absolute;
                top: 23px;

                .x-toolbar-cell {
                    display: inline-block !important;
                    opacity: 0.8;

                    .x-btn-mc img {
                        display: none;
                    }

                    // First page
                    &:nth-child(1) { /* OPTIMISE SELECTOR ::: css/app/side-panel/_tab-search.scss ::: 1 */
                        background: url(_icon("navFirst", "white")) no-repeat center center / 16px 16px;
                        margin-left: 50px;

                        &:hover {
                            opacity: 1;
                            cursor: pointer;
                        }
                    }

                    // Previous page
                    &:nth-child(2) { /* OPTIMISE SELECTOR ::: css/app/side-panel/_tab-search.scss ::: 2 */
                        background: url(_icon("navPrevious", "white")) no-repeat center center / 16px 16px;
                        margin-left: 5px;

                        &:hover {
                            opacity: 1;
                            cursor: pointer;
                        }
                    }

                    // Skip to page input
                    &:nth-child(5) { /* OPTIMISE SELECTOR ::: css/app/side-panel/_tab-search.scss ::: 3 */
                        &:hover {
                            opacity: 1;
                        }
                    }

                    // Next Page
                    &:nth-child(8) { /* OPTIMISE SELECTOR ::: css/app/side-panel/_tab-search.scss ::: 4 */
                        background: url(_icon("navNext", "white")) no-repeat center center / 16px 16px;
                        margin-right: 5px;

                        &:hover {
                            opacity: 1;
                            cursor: pointer;
                        }
                    }

                    // Last page
                    &:nth-child(9) { /* OPTIMISE SELECTOR ::: css/app/side-panel/_tab-search.scss ::: 5 */
                        background: url(_icon("navLast", "white")) no-repeat center center / 16px 16px;
                        margin-right: 5px;

                        &:hover {
                            opacity: 1;
                            cursor: pointer;
                        }

                    }

                    // Refresh results
                    &:nth-child(11) { /* OPTIMISE SELECTOR ::: css/app/side-panel/_tab-search.scss ::: 6 */
                        background: url(_icon("refresh", "white")) no-repeat center center / 18px 14px;

                        &:hover {
                            opacity: 1;
                            cursor: pointer;
                        }
                    }
                }
            }
        }

        .x-grid3-row {
            tbody,
            tr {
                width: 100% !important;
                display: block;
            }
        }

        .x-grid-cell-first {
            display: inline-block;
            width: 35px !important;
        }

        .x-grid3-cell-last {
            display: inline-block;
            width: calc(100% - 55px) !important;
            padding-right: 20px;
        }

        .my-paging-display {
            z-index: 9999999;
            text-align: center;
            font-style: normal;
            text-transform: uppercase;
            cursor: default;
            @include text(_size("tiny"), rgba(_color("secondary"), 0.6), _weight("bold"));
            color: #fff !important;
        }

        .my-paging-text {
            @include text(10px, _color("secondary"), _weight("normal"));
            padding: 0 5px;
            color: #fff !important;
        }
    }

    .results-column {
        &:before {
            font-size: 14px;
            color: red;
            display: block;
            position: absolute;
            top: 0px;
            left: 9px;
            z-index: 99999;
            color: _color("primary", normal);
            font-style: italic;
        }

        &[data-results-status="no-results"]:before {
            content: _dictionary("no_results")
        }

        &[data-results-status="results"]:before {
        }

        &[data-results-status="searching"]:before {
            content: "Searching ...";
            font-size: 26px;
            top: 35%;
            left: 50%;
            background: url(../images/loader_dark.svg) no-repeat center center; /* OPTIMISE URL ::: css/app/side-panel/_tab-search.scss ::: 1 */
            width: 40px;
            height: 40px;
            text-indent: -50000px;
            pointer-events: none;
        }
    }
}
